#include <stdio.h>
#include <ctype.h>

/*
 * isalnum - 判断一个字符是否是字母或数字 
 */ 

int main()
{
	int i = 0, n = 0;
	char str[] = "*ab%c123_ABCDEFGHijkLM-,,,,..";

	while (str[i]) {
		if (isalnum(str[i]))
			n++;
		i++;
	}

	printf("There are %d characters in str is alphanumeric.\n", n);

	return 0;
}
